from django.db import models

# Until there is a better home for these models...
class JosCoreAclAro(models.Model):
    id = models.IntegerField(primary_key=True)
    section_value = models.CharField(unique=True, max_length=240)
    value = models.CharField(unique=True, max_length=240)
    order_value = models.IntegerField()
    name = models.CharField(max_length=255)
    hidden = models.IntegerField()
    class Meta:
        db_table = u'jos_core_acl_aro'

class JosCoreAclAroGroups(models.Model):
    id = models.IntegerField(primary_key=True)
    parent_id = models.IntegerField()
    name = models.CharField(max_length=255)
    lft = models.IntegerField()
    rgt = models.IntegerField()
    value = models.CharField(max_length=255)
    class Meta:
        db_table = u'jos_core_acl_aro_groups'

class JosCoreAclAroMap(models.Model):
    acl_id = models.IntegerField(primary_key=True)
    section_value = models.CharField(max_length=230, primary_key=True)
    value = models.CharField(max_length=100, primary_key=True)
    class Meta:
        db_table = u'jos_core_acl_aro_map'

class JosCoreAclAroSections(models.Model):
    id = models.IntegerField(primary_key=True)
    value = models.CharField(unique=True, max_length=230)
    order_value = models.IntegerField()
    name = models.CharField(max_length=230)
    hidden = models.IntegerField()
    class Meta:
        db_table = u'jos_core_acl_aro_sections'

class JosCoreAclGroupsAroMap(models.Model):
    group_id = models.IntegerField(unique=True)
    section_value = models.CharField(unique=True, max_length=240)
    aro_id = models.IntegerField(unique=True)
    class Meta:
        db_table = u'jos_core_acl_groups_aro_map'

class JosCoreLogItems(models.Model):
    time_stamp = models.DateField()
    item_table = models.CharField(max_length=50)
    item_id = models.IntegerField()
    hits = models.IntegerField()
    class Meta:
        db_table = u'jos_core_log_items'

class JosComponents(models.Model):
    id = models.IntegerField(primary_key=True)
    name = models.CharField(max_length=50)
    link = models.CharField(max_length=255)
    menuid = models.IntegerField()
    parent = models.IntegerField()
    admin_menu_link = models.CharField(max_length=255)
    admin_menu_alt = models.CharField(max_length=255)
    option = models.CharField(max_length=50)
    ordering = models.IntegerField()
    admin_menu_img = models.CharField(max_length=255)
    iscore = models.IntegerField()
    params = models.TextField()
    enabled = models.IntegerField()
    class Meta:
        db_table = u'jos_components'

class JosGroups(models.Model):
    id = models.IntegerField(primary_key=True)
    name = models.CharField(max_length=50)
    class Meta:
        db_table = u'jos_groups'


class JosSession(models.Model):
    username = models.CharField(max_length=450, blank=True)
    time = models.CharField(max_length=42, blank=True)
    session_id = models.CharField(max_length=200, primary_key=True)
    guest = models.IntegerField(null=True, blank=True)
    userid = models.IntegerField(null=True, blank=True)
    usertype = models.CharField(max_length=50, blank=True)
    gid = models.IntegerField()
    client_id = models.IntegerField()
    data = models.TextField(blank=True)
    class Meta:
        db_table = u'jos_session'

